aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/send/ark/[address]/+layout.server.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/(app)/send/ark/[address]/+layout.server.ts')
-rw-r--r--src/routes/(app)/send/ark/[address]/+layout.server.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/routes/(app)/send/ark/[address]/+layout.server.ts b/src/routes/(app)/send/ark/[address]/+layout.server.ts
index e7a216d6..cf16ea36 100644
--- a/src/routes/(app)/send/ark/[address]/+layout.server.ts
+++ b/src/routes/(app)/send/ark/[address]/+layout.server.ts
@@ -18,7 +18,8 @@ export async function load({ cookies, params, parent }) {
const recipient = await get(`/users/${invoice.uid}`);
let r = `/pay/${recipient.username}`;
if (amount) r += `/${amount}`;
- if (recipient?.id !== user.id) redirect(307, r);
+ if (recipient?.id !== user.id && recipient.id === invoice.aid)
+ redirect(307, r);
}
return { balance };